package daos;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Conexao 
{
	private static Connection connection;
	
	public static Connection get() throws SQLException
	{
		if(connection == null)
		{
			connection = DriverManager.getConnection ("jdbc:postgresql:escola_simples", "postgres", "coppetec");
			connection.setAutoCommit(false);
			System.out.println("Carregada conexao.");
		}
		
		return connection;
	}
	
}
